Platform views are drawn at the wrong position and don't fill the parent · Issue #103630 · flutter/flutter · GitHub 您所在的位置:网站首页 flutter platform Platform views are drawn at the wrong position and don't fill the parent · Issue #103630 · flutter/flutter · GitHub

Platform views are drawn at the wrong position and don't fill the parent · Issue #103630 · flutter/flutter · GitHub

2023-03-13 01:53| 来源: 网络整理| 查看: 265

I don't know what @000panther is referring to but it seems that official documentation on hosting native views in Android might be wrong. Or maybe I am doing something wrong.

https://docs.flutter.dev/development/platform-integration/android/platform-views tells us that with Hybrid Composition approach we should be using PlatformViewsService.initSurfaceAndroidView(). For me, when using Flutter 3.3 this appears to result in a crash from libEGL.so when I load the native view the second time.

Using PlatformViewsService.initExpensiveAndroidView() instead appears to be working fine.

First comment by @stuartmorgan here #107313 indicates that using initSurfaceAndroidView() actually selects what he called Texture Layer Hybrid Composition. And real Hybrid Composition is selected by using initExpensiveAndroidView which works for me but is contradicting the official documentation. That comment was written almost two months ago so things might have changed since then.

Also can someone confirm that we are indeed supposed to call create() manually when creating an android view?



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有